generate-controller

Purpose

Generates a controller for the given domain class

Examples

grails generate-controller Book

Description

Grails supports a feature known as scaffolding which involves the generation of a CRUD (Create/Read/Update/Delete) interface for a given domain class.

The generate-controller command allows you to generate a controller that implements CRUD for the given domain class. So for a domain class Book a controller in grails-app/controllers/BookController.groovy will be generated.

Usage:

grails generate-controller [domain class name]

Fired Events: